//
//  YSSuperWebViewLaunch.m
//  YSSuperWebViewSDK
//
//  Created by 宋宏康 on 2020/2/21.
//

#import "YSSuperWebViewLaunch.h"
#import "APIManager.h"

@implementation YSSuperWebViewLaunch
+ (void)load
{
    __block id observer =
    [[NSNotificationCenter defaultCenter]
     addObserverForName:UIApplicationDidFinishLaunchingNotification
     object:nil
     queue:nil
     usingBlock:^(NSNotification *note) {
        [self configWithLaunchOptions:note.userInfo];
         [[NSNotificationCenter defaultCenter] removeObserver:observer];
     }];
}

+ (void)configWithLaunchOptions:(NSDictionary *)dict
{
    APIConfiguration *configuration = [[APIConfiguration alloc] init];
       // 调试时可以开启WiFi代码同步功能
    configuration.enableWifiSync = NO;
    [[APIManager sharedManager] initSDKWithLaunchOptions:dict configuration:configuration];
}
@end
